package com.hgwz.java;

public class Test2 {
    public static void main(String[] args) {
        int a = 2;
        int b = 1;

        try {
            float c = a / b;
            System.out.println("result = " + c);
        }catch (ArithmeticException ae){
            System.out.println("Error occurs: " + ae.getMessage());
        }finally {
            System.out.println("All test finished!");
        }
    }
}
